

class FormalOperand(object):
    def __init__(self, preamble=None):
        self.preamble = preamble
    def __repr__(self):
        return "_"

class FormalOperator(object):
    GREEDY = -1
    def __init__(self, priority, left_arity, right_arity, 
                 left_mandatory=None, right_mandatory=None, preamble=None):
        self.priority = priority
        self.left_arity = left_arity
        self.right_arity = right_arity
        if left_mandatory is not None:
            self.left_mandatory = left_mandatory
        else:
            self.left_mandatory = self.left_arity
        if right_mandatory is not None:
            self.right_mandatory = right_mandatory
        else:
            self.right_mandatory = self.right_arity
        self.preamble = preamble
    def __repr__(self):
        return "op"
